From 02d879254e8bc7b00cf809613daaa8cbd54ca183 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mar 04 2013 12:12:07 +0000 Subject: Merge branch 'master' into f18 Conflicts: .gitignore ark.spec sources --- diff --git a/.gitignore b/.gitignore index 2fdae3f..870217a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1 @@ -/ark-4.8.5.tar.xz -/ark-4.9.1.tar.xz -/ark-4.9.2.tar.xz -/ark-4.9.3.tar.xz -/ark-4.9.4.tar.xz -/ark-4.9.5.tar.xz +/ark-4.10.1.tar.xz diff --git a/ark-4.9.97-improve_subfolder_autodetection.patch b/ark-4.9.97-improve_subfolder_autodetection.patch new file mode 100644 index 0000000..212eeb1 --- /dev/null +++ b/ark-4.9.97-improve_subfolder_autodetection.patch @@ -0,0 +1,80 @@ +diff --git a/app/batchextract.cpp b/app/batchextract.cpp +index 9e466350568384247e99362745205c417b27873f..86f946b18f94f83b42d4bcd0bc320e6a5a3e7e64 100644 +--- a/app/batchextract.cpp ++++ b/app/batchextract.cpp +@@ -68,9 +68,9 @@ void BatchExtract::addExtraction(Kerfuffle::Archive* archive) + { + QString destination = destinationFolder(); + +- if ((autoSubfolder()) && (!archive->isSingleFolderArchive())) { ++ if ((autoSubfolder()) && (!archive->isSingleFolderArchive() || !archive->fileBaseName().startsWith(archive->subfolderName()))) { + const QDir d(destination); +- QString subfolderName = archive->subfolderName(); ++ QString subfolderName = archive->fileBaseName(); + + if (d.exists(subfolderName)) { + subfolderName = KIO::RenameDialog::suggestName(destination, subfolderName); +diff --git a/kerfuffle/archive.h b/kerfuffle/archive.h +index 515788f978c1d29146c25dcb57a9dad2d46371f7..38049f2c949eb2ab804fc61f9da9336e6e848b77 100644 +--- a/kerfuffle/archive.h ++++ b/kerfuffle/archive.h +@@ -95,6 +95,7 @@ public: + ~Archive(); + + QString fileName() const; ++ QString fileBaseName() const; + bool isReadOnly() const; + + KJob* open(); +diff --git a/kerfuffle/archive.cpp b/kerfuffle/archive.cpp +index c2c5b18528def63405a8703475b1c592ca945973..470fc56879a2d5e579389b69591da9f230af74ea 100644 +--- a/kerfuffle/archive.cpp ++++ b/kerfuffle/archive.cpp +@@ -196,6 +196,16 @@ QString Archive::fileName() const + return m_iface->filename(); + } + ++QString Archive::fileBaseName() const ++{ ++ QString base = QFileInfo(m_iface->filename()).completeBaseName(); ++ //special case for tar.gz/bzip2 files ++ if (base.right(4).toUpper() == QLatin1String(".TAR")) { ++ base.chop(4); ++ } ++ return base; ++} ++ + void Archive::onAddFinished(KJob* job) + { + //if the archive was previously a single folder archive and an add job +@@ -217,15 +227,7 @@ void Archive::onListFinished(KJob* job) + m_isPasswordProtected = ljob->isPasswordProtected(); + m_subfolderName = ljob->subfolderName(); + if (m_subfolderName.isEmpty()) { +- QFileInfo fi(fileName()); +- QString base = fi.completeBaseName(); +- +- //special case for tar.gz/bzip2 files +- if (base.right(4).toUpper() == QLatin1String(".TAR")) { +- base.chop(4); +- } +- +- m_subfolderName = base; ++ m_subfolderName = fileBaseName(); + } + + m_hasBeenListed = true; +diff --git a/kerfuffle/jobs.cpp b/kerfuffle/jobs.cpp +index aedc62c4c9902c4f3207c648747f2e427446d5e5..de16439ce46283956e7741662bda19d1e8e591fa 100644 +--- a/kerfuffle/jobs.cpp ++++ b/kerfuffle/jobs.cpp +@@ -217,7 +217,8 @@ void ListJob::onNewEntry(const ArchiveEntry& entry) + m_isPasswordProtected |= entry [ IsPasswordProtected ].toBool(); + + if (m_isSingleFolderArchive) { +- const QString fileName(entry[FileName].toString()); ++ const QString fileName(entry[FileName].toString() ++ .replace(QRegExp(QString::fromAscii("^\\./")), QString())); + const QString basePath(fileName.split(QLatin1Char( '/' )).at(0)); + + if (m_basePath.isEmpty()) { diff --git a/ark-4.9.97-r107635.patch b/ark-4.9.97-r107635.patch new file mode 100644 index 0000000..c958399 --- /dev/null +++ b/ark-4.9.97-r107635.patch @@ -0,0 +1,11 @@ +diff -up ark-4.9.97/app/mainwindow.cpp.r107635 ark-4.9.97/app/mainwindow.cpp +--- ark-4.9.97/app/mainwindow.cpp.r107635 2012-12-17 09:07:06.000000000 -0600 ++++ ark-4.9.97/app/mainwindow.cpp 2013-01-05 13:17:50.206588420 -0600 +@@ -69,7 +69,6 @@ MainWindow::~MainWindow() + if (m_recentFilesAction) { + m_recentFilesAction->saveEntries(KGlobal::config()->group("Recent Files")); + } +- delete m_part; + m_part = 0; + } + diff --git a/ark.spec b/ark.spec index f81a6e9..53c1321 100644 --- a/ark.spec +++ b/ark.spec @@ -1,6 +1,6 @@ Name: ark Summary: Archive manager -Version: 4.9.5 +Version: 4.10.1 Release: 1%{?dist} License: GPLv2+ @@ -16,6 +16,10 @@ Source0: http://download.kde.org/%{stable}/%{version}/src/%{name}-%{version}.tar ## upstreamable patches # libkerfuffle namelink_skip Patch50: ark-4.7.80-namelink_skip.patch +# https://git.reviewboard.kde.org/r/107635/ +Patch52: ark-4.9.97-r107635.patch +# https://git.reviewboard.kde.org/r/107634/ +Patch53: ark-4.9.97-improve_subfolder_autodetection.patch ## upstream patches @@ -38,7 +42,7 @@ Obsoletes: kdeutils-ark < 6:4.7.80 Provides: kdeutils-ark = 6:%{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release} -Requires: kdebase-runtime%{?_kde4_version: >= %{_kde4_version}} +Requires: kde-runtime%{?_kde4_version: >= %{_kde4_version}} Requires: p7zip-plugins %description @@ -63,6 +67,8 @@ Provides: kdeutils-ark-libs = 6:%{version}-%{release} %setup -q -n %{name}-%{version} %patch50 -p1 -b .namelink_skip +%patch52 -p1 -b .r107635 +%patch53 -p1 -b .improve_subfolder_autodetection %build @@ -122,8 +128,29 @@ fi %changelog -* Sat Dec 29 2012 Rex Dieter - 4.9.5-1 -- 4.9.5 +* Sat Mar 02 2013 Rex Dieter - 4.10.1-1 +- 4.10.1 + +* Fri Feb 01 2013 Rex Dieter - 4.10.0-1 +- 4.10.0 + +* Tue Jan 22 2013 Rex Dieter - 4.9.98-1 +- 4.9.98 +- respin reviewboard#107634 patch + +* Thu Jan 17 2013 Tomas Bzatek - 4.9.97-3 +- Rebuilt for new libarchive + +* Sat Jan 05 2013 Rex Dieter - 4.9.97-2 +- Ark needs to know about application/x-source-rpm (#885316) +- Improve subfolder autodetection (kde review 107634) +- Don't delete the KPart in the MainWindow destructor (kde review 107635) + +* Fri Jan 04 2013 Rex Dieter - 4.9.97-1 +- 4.9.97 + +* Thu Dec 20 2012 Rex Dieter - 4.9.95-1 +- 4.9.95 * Mon Dec 03 2012 Than Ngo - 4.9.4-1 - 4.9.4 diff --git a/sources b/sources index f9de2a5..e1b0a50 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -17d1c8efe0095ce57310f4873cd9a730 ark-4.9.5.tar.xz +024da5a554b04d2fb420adaaeedfb911 ark-4.10.1.tar.xz