Your message dated Sun, 24 May 2015 00:12:44 -0400
with message-id <[email protected]>
and subject line Re: Bug#270370: devscripts: File checking script
has caused the Debian Bug report #270370,
regarding [new] File checking script
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
270370: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=270370
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: devscripts
Version: 2.8.4
Severity: wishlist

----- Forwarded message from [email protected] -----

Date: Fri, 13 Aug 2004 15:34:39 -0700 (PDT)
From: [email protected]
Subject: devscripts: File checking script
To: [email protected], [email protected]

I wrote this script while trying to build a deb from a new upstream
release.  The new release was a major release so a number of new files
were included in the build but were not included in the
package.{docs,examples,install,ignore} files.  Vice versa, there were
a number of old files that were mentioned in the
package.{docs,examples,install,ignore} files but were no longer a part
of the build.

This script will check the existance of the expansion of every line of
the package.{docs,examples,install,ignore} files.  If a line doesn't
expand to an existing file then it prints a message indicating which
package.{docs,examples,install,ignore} file and which lines in that
file generated the error.

Vice versa, the script checks all the files created in the debian/tmp
build directory to see if they match any of the expanded lines of the
package.{docs,examples,install,ignore} files.  If there are any files
in teh build dir not accounted for in the
package.{docs,examples,install,ignore} files it prints a list of
them.

This script is useful somewhere between uupdate and
dpkg-buildpackage/debuild.  Unfortunately, I couldn't find a way to
run dpkg-buildpackage that would just run the make and make install
without trying to assemble the deb.  If I could then I would run
uupdate, then run dpkg-buildpackage to the completion of the
installation into debian/tmp, then I would run my script to check
everything, then I would proceed with the assembly of the build and
the lintian checks and the like.

Hope this is useful.

Ross Patterson
Programmer/Analyst
831-459-2792
[email protected]
1156 High St, Barn G, PP&C
Santa Cruz, CA 95064

----- End forwarded message -----
#!/bin/bash
# Written by Ross Patterson <[email protected]>

# Get the names of all the packages to be built
packages=`grep '^Package: ' debian/control`
packages=${packages//Package: /}

# Get the names of all the files in the debian directory that list
# package files
suffixes="docs,examples,install,ignore"
lists=$(eval ls -d debian/{$suffixes} 2>/dev/null
        for package in $packages; do
            eval ls -d debian/$package.{$suffixes} 2>/dev/null
        done)

# Print files listed in the lists that don't exist in the build
found=""
for list in $lists; do
    missing=""
    for line in $(<$list); do
        found="$found `eval ls -d $line 2> /dev/null ||\
                       eval ls -d debian/tmp/$line 2> /dev/null`" ||\
            missing="$missing $line"
    done
    if [[ -n $missing ]]; then
        echo "Files listed in $list but missing in the build:"
        for m in $missing; do echo $m; done
        echo
    fi
done

# Print files contained in the build that aren't mentioned in the
# lists.
unlisted=$(
    for installed in `find debian/tmp/ -type f`; do
        dir=`dirname $installed`
        paths="$installed"
        while [[ $dir != "." ]]; do
            paths="$paths\|$dir"
            dir=`dirname $dir`
        done
        echo $found | grep "\(^\| \)\($paths\)\( \|$\)"\
            > /dev/null || echo $installed
    done)
if [[ -n $unlisted ]]; then
    echo "Files from the build not listed in the package:"
    for f in $unlisted; do echo $f; done
    echo
fi

--- End Message ---
--- Begin Message ---
On Fri, Aug 13, 2004 at 15:34:39 -0700, rossp wrote:
> This script will check the existance of the expansion of every line of
> the package.{docs,examples,install,ignore} files.  If a line doesn't
> expand to an existing file then it prints a message indicating which
> package.{docs,examples,install,ignore} file and which lines in that
> file generated the error.

Although such a scenario isn't a problem, I understand the desire to
keep a clean description of what should be installed to the package.

> Vice versa, the script checks all the files created in the debian/tmp
> build directory to see if they match any of the expanded lines of the
> package.{docs,examples,install,ignore} files.  If there are any files
> in teh build dir not accounted for in the
> package.{docs,examples,install,ignore} files it prints a list of
> them.

It seems this is covered by “dh_install --list-missing”.

I think it'd make more sense to try and get the functionality you want
implemented in debhelper rather than duplicating functionality in
devscripts.  Therefore, I'm closing this bug report.

Cheers,
-- 
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <[email protected]>

--- End Message ---
_______________________________________________
devscripts-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel

Reply via email to