Skip to content

Commit

Permalink
cards 2.4.124
Browse files Browse the repository at this point in the history
fixes in mybld
mybld -p new option

cards install a set of package even a package and a set has the same name
cards remove a set of package

runtime_dependencies_utils.cxx
   small mistake, missing a return
  • Loading branch information
tnut committed Dec 16, 2020
1 parent 02395ef commit 8f9b993
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ INSTALL_DATA = $(INSTALL) -m 644
INSTALL_DIR = $(INSTALL) -d


VERSION = 2.4.123
VERSION = 2.4.124

NAME = cards-$(VERSION)

Expand Down
21 changes: 14 additions & 7 deletions scripts/mybld.in
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ case $1 in
shift
PARAM+=($1);;

-p|--pause)
PAUSE=" && export PATH=/root/$VERSION/scripts:$PATH && printf \"You are now in the chroot.\n\
Type exit when finish.\n\n Good Luck !!!\n\n\" && bash";;

-I|--init)
INIT="yes";;

Expand Down Expand Up @@ -456,9 +460,11 @@ if [ ! -d .git ]; then
"
exit 1
fi
parse_arguments "$@"

[ -z "$VERSION" ] && VERSION="$(git branch --show-current)"

parse_arguments "$@"

[ -z "$COLLECTION" ] && find_collection

if [ "$INIT" == "yes" ]; then
Expand Down Expand Up @@ -552,6 +558,12 @@ GIT=$(basename $GIT_PROJ)
mkdir -p "$ROOT/${VERSION}/${COLLECTION}/etc" || exit 1

setup_cards_conf

DEVEL="cards.devel \
&& cd /root/$GIT \
$PAUSE \
&& bash scripts/$COLLECTION"

echo "$CARDS_CONF" > $ROOT/$VERSION/$COLLECTION/etc/cards.conf
[ -z "${PARAM[0]}" ] && CHROOT="ncurses readline bash"
if [ "$COLLECTION" == "base" ] \
Expand All @@ -561,18 +573,13 @@ if [ "$COLLECTION" == "base" ] \
|| [ "$COLLECTION" == "gui-extra" ] \
|| [ "$COLLECTION" == "desktops" ] \
|| [ "$COLLECTION" == "nos" ]; then
DEVEL="cards.devel \
&& cd /root/$GIT \
&& bash scripts/$COLLECTION"
if ! [ -z "${PARAM[0]}" ]; then
DEVEL="$DEVEL ${PARAM[0]}"
else
DEVEL="$DEVEL -a"
fi
else
DEVEL="cards.devel \
&& cd /root/$GIT \
&& bash scripts/$COLLECTION -a \
DEVEL="$DEVEL -a \
&& bash scripts/$COLLECTION-extra -a"
EXTRA="yes"
fi
Expand Down
2 changes: 1 addition & 1 deletion scripts/pkgmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ unpack_source() {
for FILE in ${source[@]}; do
LOCAL_FILENAME="$(get_filename $FILE)"
case $LOCAL_FILENAME in
*.tar|*.tar.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tbz2|*.tar.xz|*.txz|*.tar.lzma|*.zip|*.rpm|*.tar.lz|*.7z|*.deb)
*.tar|*.tar.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tbz2|*.tar.xz|*.txz|*.tar.lzma|*.zip|*.tar.zst|*.rpm|*.tar.lz|*.7z|*.deb)
if [ "$PKGMK_IGNORE_UNPACK" != "yes" ];then
COMMAND="bsdtar -p -o -C $SRC -xf $LOCAL_FILENAME"
else
Expand Down
2 changes: 1 addition & 1 deletion src/cards_install.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Cards_install::Cards_install(const CardsArgumentParser& argParser,
std::set<std::string> ListOfPackage = getListOfPackagesFromSet(i);
if (ListOfPackage.empty() )
ListOfPackage = getListOfPackagesFromCollection(i);
if ( (!ListOfPackage.empty()) && (!checkBinaryExist(i)) ) {
if ( !ListOfPackage.empty() ) {
/*
* It's a collection or a set
*/
Expand Down
29 changes: 9 additions & 20 deletions src/runtime_dependencies_utils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,8 @@ int get_64bit_elf_header_part(FILE *file)
}
int getRuntimeLibrariesList(set<string>& runtimeLibrariesList, const string& fileName)
{

#ifndef NDEBUG
printf("sizeof unsigned char: %d\n",sizeof(unsigned char));
printf("sizeof unsigned short int: %d\n",sizeof(unsigned short int));
printf("sizeof short int: %d\n",sizeof(short int));
printf("sizeof int: %d\n",sizeof(int));
printf("sizeof unsigned int: %d\n",sizeof(unsigned int));
printf("sizeof int long: %d\n",sizeof(int long));
printf("sizeof double: %d\n",sizeof(double));
printf("sizeof unsigned long long: %u\n",sizeof( unsigned long long));
printf("sizeof unsigned long : %u\n",sizeof( unsigned long));
printf("\n==>File open: %s\n",fileName.c_str());
#endif
unsigned long dynamic_addr = 0;
unsigned long dynamic_size_32bits = 0;
Expand All @@ -95,10 +86,6 @@ int getRuntimeLibrariesList(set<string>& runtimeLibrariesList, const string& fil
file = fopen (file_name, "rb" );
if (file == NULL)
return error("Cannot open the file");
#ifndef NDEBUG
printf("File open: %s\n",file_name);
#endif


/* Magic number */
buffer = (Elf_Ehdr_Begin *)malloc( sizeof(elf_header_begin));
Expand Down Expand Up @@ -141,6 +128,7 @@ int getRuntimeLibrariesList(set<string>& runtimeLibrariesList, const string& fil

if (elf_header_end.e_shnum == 0)
return error ("There are no Sections in this file");

#ifndef NDEBUG
printf("\nNumber of Section header: %d 0x%x\n",
elf_header_end.e_shnum,elf_header_end.e_shnum);
Expand All @@ -151,6 +139,7 @@ int getRuntimeLibrariesList(set<string>& runtimeLibrariesList, const string& fil
printf("Size of Program header entity: %d 0x%x\n\n",
elf_header_end.e_phentsize,elf_header_end.e_phentsize);
#endif

/* Main check if it's a 32 bits or 64 bits elf files */
if ( elf_header_begin.e_ident[EI_CLASS] == ELFCLASS32 )
{
Expand All @@ -165,7 +154,7 @@ int getRuntimeLibrariesList(set<string>& runtimeLibrariesList, const string& fil
elf_header_end.e_shnum);

if (!section_headers_32bits)
return error ("There are no Sections in this file\n");
return error ("There are no 32bits Sections in this file\n");

for (int i = 0;i < elf_header_end.e_shnum;i++)
{
Expand Down Expand Up @@ -222,7 +211,7 @@ int getRuntimeLibrariesList(set<string>& runtimeLibrariesList, const string& fil
1,dynamic_size_32bits);

if (!dynamics_section_32bits)
error("Out of mem");
return error("Out of mem");

if (fseek (file, 0, SEEK_END))
return error ("Error to seek to end of the file");
Expand Down Expand Up @@ -304,7 +293,7 @@ int getRuntimeLibrariesList(set<string>& runtimeLibrariesList, const string& fil
dependencies_utils_end();
#ifndef NDEBUG
printf("No dynamics found\n");
printf("offset : %u 0x%x\n",
printf("offset : %u 0x%x\n",
offset,offset);
#endif
return 0;
Expand All @@ -316,9 +305,9 @@ int getRuntimeLibrariesList(set<string>& runtimeLibrariesList, const string& fil
{
dependencies_utils_end();
#ifndef NDEBUG
printf("No dynamics found\n");
printf("offset : %u 0x%x\n",
offset,offset);
printf("No dynamics found\n");
printf("offset : %u 0x%x\n",
offset,offset);
#endif
return 0;
}
Expand Down

0 comments on commit 8f9b993

Please sign in to comment.