Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Representing Architectures in libdebctrl

 
   Linux (Home) -> Perl RSS
Next:  [Samba] smbclient failing: Server requested plain..  
Author Message
Jonathan Yu

External


Since: Jul 05, 2009
Posts: 8



(Msg. 1) Posted: Mon Jul 06, 2009 11:25 pm
Post subject: Representing Architectures in libdebctrl
Archived from groups: linux>debian>maint>perl (more info?)

Hey all:

I'm currently stuck on how to represent architecture information in
libdebctrl. Currently I've considered an elaborate system where:

an Architecture is a struct with fields:
char *name;
int flags;

The name part is the architecture name, like "i386" or "any" or
"solaris" -- these are all validated according to the values provided
by dpkg-architectures -L, but will also accept other arbitrary
architectures (though it will issue a warning)

Now, if you've got a collection of architectures, like: Architecture: i386 amd64

I'm stuck on how to represent that. My first thought was just a linked
list of the aforementioned Architecture structs, which works, but
makes error reporting somewhat difficult, due to the way that error
reporting is done in libdebctrl.

Here's a brief primer on how error reporting works:

1. Every stage that could have an error has a linked list which is an
error stack
2. Every time an error is encountered, an Error object is pushed to
the end of that stack
3. Users check if errors have occurred using "has_error" on that stack
4. If users are interested in what errors have happened, you would
look at that stack
5. Languages which support exceptions would check has_error for every
operation, and throw an exception containing the top error on the
stack

The problem with this is that each Architecture list would need to be
passed a pointer to the error stack in order to add to it... which
makes it sort of complicated to work with.

As I mentioned above, the error reporting is made a bit difficult
because it means every operation would require an error stack to be
passed as well, which looks pretty bad for the user. It doesn't make
much sense to do:

platform_new(error_stack, arch_list_object, "i386");

where error_stack is a GList of Error objects
and arch_list_object is an ArchitectureList pointer (which right now
is just a GList)

However I'm at a loss for how I could more simply implement such a feature.

Any insight anyone could offer on what I might be able to do would be
greatly appreciated.

Cheers,

Jonathan


--
To UNSUBSCRIBE, email to debian-perl-REQUEST.TakeThisOut@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.TakeThisOut@lists.debian.org
Back to top
Login to vote
Display posts from previous:   
Related Topics:
[FYI] debian.pkgs.cpan.org - Hi, As Joachim attented me to this list, I figured an update on the goings on might be appreciated. The new CPANPLUS functionality, and by proxy debian.pkgs.cpan.org have been announced as prototype to the perl community, or at least that fraction..

Why aren't the actual module names in the package descript.. - (This post is about an issue I've seen with other Debian Perl packages, but uses libmailtools-perl as an example.) Last week I needed Mail::Mailer on a Debian Woody machine, and wanted to use apt-get to install it. Trying: apt-cache search perl |..

Now able to do package uploads - Hello folks, I'm already a member of the pkg-perl group in Alioth as rra-guest, but hadn't done much while I was working on the NM process. I've now been approved as a Debian developer and am willing to help do uploads, co-maintain packages, etc. Coul...

packaging CPANPLUS - Hello, I want to package CPANPLUS, so far I see that I have to package as well: - Term-UI-0.12 - Params-Check-0.23 - Log-Message-0.01 - Log-Message-Simple-0.01 Maybe someone have prepared already such packages and waits for filling ITP or something?....

wxPerl, anyone? - Since I haven't found an ITP so far: Is anybody working on packageing wxPerl, a Perl binding for the cross-platform wxWidgets library? Cheers, -Hilko -- To UNSUBSCRIBE, email to debian-perl-REQUEST@lists.debian.org with a subject of "unsubscrib...
       Linux (Home) -> Perl All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
  Linux Forums
 Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact