[pacman-dev] [PATCH] Make possible to create an empty package

Roman Kyrylych roman.kyrylych at gmail.com
Tue Jun 5 16:30:47 EDT 2007


Hi!

This one fixes BR #6818.
Sorry for previous mail, forgot to add [pacman-dev] prefix, so not
sure if it will be processed correctly.

From 2579bee0eb8b17be8a4a0a946d5fc94c7e5800cb Mon Sep 17 00:00:00 2001
From: Roman Kyrylych <roman at archlinux.org>
Date: Mon, 4 Jun 2007 21:30:20 +0300
Subject: [PATCH] Make possible to create an empty package

Signed-off-by: Roman Kyrylych <roman at archlinux.org>
---
 scripts/makepkg.in |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/makepkg.in b/scripts/makepkg.in
index 1a25902..3ac904e 100644
--- a/scripts/makepkg.in
+++ b/scripts/makepkg.in
@@ -749,7 +749,7 @@ create_package() {

        # build a filelist - do this first to keep meta files out of the list
        msg2 "$(gettext "Generating .FILELIST file...")"
-       tar -cvf /dev/null * | sort >.FILELIST
+       find * 2>/dev/null | sort >.FILELIST

        # write the .PKGINFO file
        msg2 "$(gettext "Generating .PKGINFO file...")"
@@ -819,7 +819,7 @@ create_package() {
        local pkg_file="$PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}"
        comp_files="$comp_files .PKGINFO .FILELIST"

-       if ! tar -czf "$pkg_file" $comp_files *; then
+       if ! tar -czf "$pkg_file" $comp_files $(ls); then
                error "$(gettext "Failed to create package file.")"
                exit 1 # TODO: error code
        fi
--
1.5.2

-- 
Roman Kyrylych (Роман Кирилич)


More information about the pacman-dev mailing list