This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [PATCH 1/2 rebase] Remove duplicates from file list
- From: Yaakov (Cygwin/X) <yselkowitz at users dot sourceforge dot net>
- To: cygwin-apps at cygwin dot com
- Date: Mon, 11 Feb 2013 03:49:41 -0600
- Subject: Re: [PATCH 1/2 rebase] Remove duplicates from file list
- References: <20130211034039.733036a5@YAAKOV04>
This is required as DLLs in some of these directories may have indeed
been installed with setup.exe as part of a package (e.g. Python doesn't
have separate vendor and site directories). It is also possible that a
file added on the command-line is already listed, wasting valuable
rebase space.
Yaakov
2013-02-11 Yaakov Selkowitz <yselkowitz@...>
* rebaseall.in: Remove duplicates from file list.
Index: rebaseall.in
===================================================================
RCS file: /cvs/cygwin-apps/rebase/rebaseall.in,v
retrieving revision 1.9
diff -u -p -r1.9 rebaseall.in
--- rebaseall.in 7 Jun 2012 18:50:33 -0000 1.9
+++ rebaseall.in 11 Feb 2013 09:30:40 -0000
@@ -47,7 +47,7 @@ usage()
cleanup()
{
- rm -f "${TmpFile}"
+ rm -f "${TmpFile}" "${SortedFile}"
exit ${ExitCode}
}
@@ -195,7 +195,8 @@ then
fi
# Set temp file
-TmpFile="$TmpDir/rebase.lst"
+SortedFile="$TmpDir/rebase.lst"
+TmpFile="${SortedFile}.in"
# Create rebase list
case $Platform in
@@ -227,11 +227,14 @@ then
cat "${FileList}" >>"${TmpFile}"
fi
+# Remove duplicates
+sort -u "${TmpFile}" > "${SortedFile}"
+
if [ -z "${BaseAddress}" ]
then
- rebase "${Verbose}" "${Touch}" "${NoDyn}" -s "${Mach}" -T "${TmpFile}"
+ rebase "${Verbose}" "${Touch}" "${NoDyn}" -s "${Mach}" -T "${SortedFile}"
else
- rebase "${Verbose}" "${Touch}" "${NoDyn}" -s "${Mach}" -b "${BaseAddress}" -o "${Offset}" -T "${TmpFile}"
+ rebase "${Verbose}" "${Touch}" "${NoDyn}" -s "${Mach}" -b "${BaseAddress}" -o "${Offset}" -T "${SortedFile}"
fi
ExitCode=$?