FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 05-13-2008, 09:43 AM
Xavier
 
Default Refactor pkg_load/parse_descfile into a new backend file

On Sun, May 11, 2008 at 6:40 PM, Dan McGee <dan@archlinux.org> wrote:
> alpm_pkg_load() and parse_descfile() are specific to getting information
> from package files, just as other code is specific to getting information
> into or out of a package database. Move this code out of package.c, which
> should eventually only contain operators on the pmpkg_t struct that do not
> depend at all on where the data came from.
>
> Signed-off-by: Dan McGee <dan@archlinux.org>
> ---
> lib/libalpm/Makefile.am | 1 +
> lib/libalpm/be_package.c | 283 ++++++++++++++++++++++++++++++++++++++++++++++
> lib/libalpm/package.c | 244 +---------------------------------------
> lib/libalpm/package.h | 1 -
> 4 files changed, 285 insertions(+), 244 deletions(-)
> create mode 100644 lib/libalpm/be_package.c
>
> diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am
> index 7b73736..871855e 100644
> --- a/lib/libalpm/Makefile.am
> +++ b/lib/libalpm/Makefile.am
> @@ -26,6 +26,7 @@ libalpm_la_SOURCES =
> alpm_list.h alpm_list.c
> backup.h backup.c
> be_files.c
> + be_package.c
> cache.h cache.c
> conflict.h conflict.c
> db.h db.c
> diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
> new file mode 100644
> index 0000000..4df3228
> --- /dev/null
> +++ b/lib/libalpm/be_package.c
> @@ -0,0 +1,283 @@
> +/*
> + * be_package.c
> + *
> + * Copyright (c) 2002-2008 by Judd Vinet <jvinet@zeroflux.org>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program. If not, see <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "config.h"
> +
> +#include <stdio.h>
> +#include <stdlib.h>
> +#include <string.h>
> +#include <limits.h>
> +#include <ctype.h>
> +#include <locale.h> /* setlocale */
> +
> +/* libarchive */
> +#include <archive.h>
> +#include <archive_entry.h>
> +
> +/* libalpm */
> +#include "alpm_list.h"
> +#include "util.h"
> +#include "log.h"
> +#include "error.h"
> +#include "package.h"
> +#include "deps.h" /* _alpm_splitdep */
> +

What is this error.h file here?
I don't see any other files who include that header.
What is weird is I think this built fine on my laptop. But here with
cygwin I don't have any error.h header so the compilation simply
failed.
After removing it, everything works perfectly.
I'm confused..

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 05-13-2008, 12:15 PM
"Dan McGee"
 
Default Refactor pkg_load/parse_descfile into a new backend file

On Tue, May 13, 2008 at 4:43 AM, Xavier <shiningxc@gmail.com> wrote:
>
> On Sun, May 11, 2008 at 6:40 PM, Dan McGee <dan@archlinux.org> wrote:
> > alpm_pkg_load() and parse_descfile() are specific to getting information
> > from package files, just as other code is specific to getting information
> > into or out of a package database. Move this code out of package.c, which
> > should eventually only contain operators on the pmpkg_t struct that do not
> > depend at all on where the data came from.
> >
> > Signed-off-by: Dan McGee <dan@archlinux.org>
> > ---
> > lib/libalpm/Makefile.am | 1 +
> > lib/libalpm/be_package.c | 283 ++++++++++++++++++++++++++++++++++++++++++++++
> > lib/libalpm/package.c | 244 +---------------------------------------
> > lib/libalpm/package.h | 1 -
> > 4 files changed, 285 insertions(+), 244 deletions(-)
> > create mode 100644 lib/libalpm/be_package.c
> >
> > diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am
> > index 7b73736..871855e 100644
> > --- a/lib/libalpm/Makefile.am
> > +++ b/lib/libalpm/Makefile.am
> > @@ -26,6 +26,7 @@ libalpm_la_SOURCES =
> > alpm_list.h alpm_list.c
> > backup.h backup.c
> > be_files.c
> > + be_package.c
> > cache.h cache.c
> > conflict.h conflict.c
> > db.h db.c
> > diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
> > new file mode 100644
> > index 0000000..4df3228
> > --- /dev/null
> > +++ b/lib/libalpm/be_package.c
> > @@ -0,0 +1,283 @@
> > +/*
> > + * be_package.c
> > + *
> > + * Copyright (c) 2002-2008 by Judd Vinet <jvinet@zeroflux.org>
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License as published by
> > + * the Free Software Foundation; either version 2 of the License, or
> > + * (at your option) any later version.
> > + *
> > + * This program is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> > + * GNU General Public License for more details.
> > + *
> > + * You should have received a copy of the GNU General Public License
> > + * along with this program. If not, see <http://www.gnu.org/licenses/>.
> > + */
> > +
> > +#include "config.h"
> > +
> > +#include <stdio.h>
> > +#include <stdlib.h>
> > +#include <string.h>
> > +#include <limits.h>
> > +#include <ctype.h>
> > +#include <locale.h> /* setlocale */
> > +
> > +/* libarchive */
> > +#include <archive.h>
> > +#include <archive_entry.h>
> > +
> > +/* libalpm */
> > +#include "alpm_list.h"
> > +#include "util.h"
> > +#include "log.h"
> > +#include "error.h"
> > +#include "package.h"
> > +#include "deps.h" /* _alpm_splitdep */
> > +
>
> What is this error.h file here?
> I don't see any other files who include that header.
> What is weird is I think this built fine on my laptop. But here with
> cygwin I don't have any error.h header so the compilation simply
> failed.
> After removing it, everything works perfectly.
> I'm confused..

Looks like that snuck in from the way-old patch (take a look a the
date). We used to have an error.h that contained not much of anything;
that was removed in commit 4c872594da321aa406cfb306c32c94ce2929d59e
and I obviously missed the bus on this.

The patch is trival- remove it.

-Dan

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 05-13-2008, 12:24 PM
Xavier
 
Default Refactor pkg_load/parse_descfile into a new backend file

On Tue, May 13, 2008 at 2:15 PM, Dan McGee <dpmcgee@gmail.com> wrote:
>
> Looks like that snuck in from the way-old patch (take a look a the
> date). We used to have an error.h that contained not much of anything;
> that was removed in commit 4c872594da321aa406cfb306c32c94ce2929d59e
> and I obviously missed the bus on this.
>
> The patch is trival- remove it.
>

How can I see the date?
But ok, that explains it. It might be that this error.h just stayed
there on my other box.

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 05-13-2008, 12:33 PM
"Dan McGee"
 
Default Refactor pkg_load/parse_descfile into a new backend file

On Tue, May 13, 2008 at 7:24 AM, Xavier <shiningxc@gmail.com> wrote:
> On Tue, May 13, 2008 at 2:15 PM, Dan McGee <dpmcgee@gmail.com> wrote:
> >
> > Looks like that snuck in from the way-old patch (take a look a the
> > date). We used to have an error.h that contained not much of anything;
> > that was removed in commit 4c872594da321aa406cfb306c32c94ce2929d59e
> > and I obviously missed the bus on this.
> >
> > The patch is trival- remove it.
> >
>
> How can I see the date?
Because this was already pushed? Take a look at the author date.
http://projects.archlinux.org/?p=pacman.git;a=commit;h=13f24a5bdabf9c2c7bfa07aff 7176495bb775a0d

> But ok, that explains it. It might be that this error.h just stayed
> there on my other box.
No, Linux or gcc 4.3 apparently doesn't blow up on a missing header
file. I don't have it here and everything compiled fine.

-Dan

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 02:47 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org