Skip to content

Commit

Permalink
Update "rpm2pkg" package to version 3.2.2:
Browse files Browse the repository at this point in the history
- Remove unused CheckSymLinks() function to fix build problems under
  DragonFly BSD.

This fixes PR pkg/44862 by Francois Tigeot.
  • Loading branch information
tron committed Apr 12, 2011
1 parent 2830a3d commit 4966c81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 49 deletions.
4 changes: 2 additions & 2 deletions pkgtools/rpm2pkg/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.57 2011/01/19 16:23:02 tron Exp $
# $NetBSD: Makefile,v 1.58 2011/04/12 22:12:41 tron Exp $

DISTNAME= rpm2pkg-3.2.1
DISTNAME= rpm2pkg-3.2.2
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
Expand Down
48 changes: 1 addition & 47 deletions pkgtools/rpm2pkg/files/rpm2pkg.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: rpm2pkg.c,v 1.20 2011/01/12 00:26:33 tron Exp $ */
/* $NetBSD: rpm2pkg.c,v 1.21 2011/04/12 22:12:42 tron Exp $ */

/*-
* Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
Expand Down Expand Up @@ -345,52 +345,6 @@ WriteFile(FileHandle *in, char *name, mode_t mode, unsigned long length,
return false;
}

static void
CheckSymLinks(PListEntry **Links, PListEntry **Files, PListEntry **Dirs)
{
PListEntry *Link;

while ((Link = *Links) != NULL) {
struct stat Stat;
PListEntry *Ptr;
char *Basename;

if (Link->pe_Left != NULL)
CheckSymLinks(&Link->pe_Left, Files, Dirs);

if ((stat(Link->pe_Name, &Stat) < 0) ||
!S_ISREG(Stat.st_mode)) {
Links = &Link->pe_Right;
continue;
}

(void)PListInsert(Files, Link->pe_Name);
if ((Basename = strrchr(Link->pe_Name, '/')) != NULL) {
*Basename = '\0';
if ((Ptr = PListFind(*Dirs, Link->pe_Name)) != NULL)
Ptr->pe_DirEmpty = false;
}

if (Link->pe_Right == NULL) {
*Links = Link->pe_Left;
free(Link);
break;
}

*Links = Link->pe_Right;
Ptr = Link->pe_Left;
free(Link);

if (Ptr == NULL)
continue;

Link = *Links;
while (Link->pe_Left != NULL)
Link = Link->pe_Left;
Link->pe_Left = Ptr;
}
}

static bool
CheckPrefix(const char *prefix, char *name)
{
Expand Down

0 comments on commit 4966c81

Please sign in to comment.