Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/i18n.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#define _I18N_H_

#ifdef HAVE_CONFIG_H
#include "config.h"
#include "config.h" // IWYU pragma: associated
#endif

#ifdef ENABLE_NLS
Expand Down
31 changes: 18 additions & 13 deletions common/raptoptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,32 @@
* USA
*/

#include "config.h"
#include "config.h" // IWYU pragma: associated

#include <fstream>
#include <sstream>
#include <dirent.h>

#include <apt-pkg/error.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/tagfile.h>
#include <apt-pkg/policy.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/fileutl.h>
#include "raptoptions.h"

#include "i18n.h"
#include "rconfiguration.h"
#include "raptoptions.h"

RAPTOptions *_roptions = new RAPTOptions;
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/tagfile.h>
#include <apt-pkg/versionmatch.h>
#include <cctype>
#include <cstdio>
#include <cstring>
#include <dirent.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <utility>

using namespace std;

RAPTOptions *_roptions = new RAPTOptions;

ostream &operator<<(ostream &os, const RAPTOptions::packageOptions &o)
{
os << o.isNew;
Expand Down
4 changes: 2 additions & 2 deletions common/raptoptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
#ifndef _RAPTOPTIONS_H_
#define _RAPTOPTIONS_H_

#include "config.h"
#include "config.h" // IWYU pragma: associated

#include <map>
#include <iostream>
#include <string>
#include <apt-pkg/configuration.h>

class RAPTOptions {
public:
Expand Down
21 changes: 11 additions & 10 deletions common/rcacheactor.cc
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
#include "config.h"
#include "config.h" // IWYU pragma: associated

#include "rcacheactor.h"

#include "rpackage.h"
#include "rpackagelister.h"
#include <apt-pkg/fileutl.h>

#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
#include <apt-pkg/tagfile.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/configuration.h>
#include <algorithm>
#include <apt-pkg/tagfile.h>
#include <cstddef>
#include <fnmatch.h>
#include <regex.h>
#include <string>
#include <utility>
#include <vector>

using namespace std;

Expand Down Expand Up @@ -47,10 +54,6 @@ void RCacheActor::notifyCachePostChange()
}
}





RCacheActorRecommends::RCacheActorRecommends(RPackageLister *lister,
string fileName)
: RCacheActor(lister)
Expand Down Expand Up @@ -194,6 +197,4 @@ void RCacheActorRecommends::run(vector<RPackage *> &PkgList, int Action)
}
}



// vim:sts=3:sw=3
8 changes: 7 additions & 1 deletion common/rcacheactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@
#ifndef _RCACHEACTOR_H
#define _RCACHEACTOR_H

#include "config.h"
#include "config.h" // IWYU pragma: associated

#include "rpackage.h"
#include "rpackagelister.h"

#include <cstddef>
#include <map>
#include <regex.h>
#include <string>
#include <vector>

class RCacheActor:public RCacheObserver {
public:
Expand Down
28 changes: 14 additions & 14 deletions common/rcdscanner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@
* USA
*/

#include "config.h"
#include "config.h" // IWYU pragma: associated

#ifndef HAVE_APTPKG_CDROM

#include <sys/stat.h>
#include <dirent.h>
#include <unistd.h>
#include <fcntl.h>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <cstdio>
#include "rcdscanner.h"

#include "i18n.h"

#include <algorithm>
#include <apt-pkg/cdromutl.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/cdromutl.h>
#include <apt-pkg/strutl.h>

#include "i18n.h"
#include "rcdscanner.h"
#include <cstdio>
#include <dirent.h>
#include <fcntl.h>
#include <fstream>
#include <iostream>
#include <sys/stat.h>
#include <unistd.h>

#ifdef HAVE_RPM
#include "rpmindexcopy.h"
Expand Down
2 changes: 1 addition & 1 deletion common/rcdscanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef _RCDSCANNER_H_
#define _RCDSCANNER_H_

#include "config.h"
#include "config.h" // IWYU pragma: associated

#ifndef HAVE_APTPKG_CDROM

Expand Down
29 changes: 15 additions & 14 deletions common/rconfiguration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,26 @@
* USA
*/

#include "config.h"
#include "config.h" // IWYU pragma: associated

#include <pwd.h>
#include <sys/types.h>

#include <sys/stat.h>
#include <sys/types.h>
#include "rconfiguration.h"

#include <unistd.h>
#include "i18n.h"

#include <apt-pkg/init.h>
#include <apt-pkg/error.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>

#include "rconfiguration.h"

#include "i18n.h"
#include <apt-pkg/init.h>
#include <apt-pkg/pkgsystem.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <pwd.h>
#include <string>
#include <sys/stat.h>
#include <unistd.h>

using namespace std;

Expand Down
2 changes: 1 addition & 1 deletion common/rconfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifndef _RCONFIGURATION_H_
#define _RCONFIGURATION_H_

#include "config.h"
#include "config.h" // IWYU pragma: associated

#include <string>
#include <fstream>
Expand Down
29 changes: 16 additions & 13 deletions common/rinstallprogress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,30 @@
* USA
*/

#include "config.h"
#include "config.h" // IWYU pragma: associated

#include <unistd.h>
#include <fcntl.h>
#include "rinstallprogress.h"

#include "i18n.h"

#include <apt-pkg/install-progress.h>
#include <apt-pkg/packagemanager.h>
#include <stdlib.h>
#include <string>
#include <sys/types.h>
#include <sys/wait.h>
#include <iostream>
#include <cstdio>
#include <apt-pkg/error.h>
#include <apt-pkg/install-progress.h>
#include <unistd.h>

#ifdef HAVE_RPM
#include <apt-pkg/configuration.h>
#include <fcntl.h>
#endif

#include "rinstallprogress.h"
using namespace std;

#include "i18n.h"
std::string RInstallProgress::finishMsg = _("\nSuccessfully applied all changes. You can close the window now.");
std::string RInstallProgress::errorMsg = _("\nNot all changes and updates succeeded. For further details of the failure, please expand the 'Details' panel below.");
std::string RInstallProgress::incompleteMsg =
string RInstallProgress::finishMsg = _("\nSuccessfully applied all changes. You can close the window now.");
string RInstallProgress::errorMsg = _("\nNot all changes and updates succeeded. For further details of the failure, please expand the 'Details' panel below.");
string RInstallProgress::incompleteMsg =
_("\nSuccessfully installed all packages of the current medium. "
"To continue the installation with the next medium close "
"this window.");
Expand All @@ -64,7 +68,6 @@ const char* RInstallProgress::getResultStr(pkgPackageManager::OrderResult res)
return "Unknown install result.";
}


pkgPackageManager::OrderResult RInstallProgress::start(pkgPackageManager *pm,
int numPackages,
int numPackagesTotal)
Expand Down
4 changes: 3 additions & 1 deletion common/rinstallprogress.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@
#ifndef _RINSTALLPROGRESS_H_
#define _RINSTALLPROGRESS_H_

#include "config.h"
#include "config.h" // IWYU pragma: associated

#include <apt-pkg/packagemanager.h>

#include <string>

class RInstallProgress {
protected:
int _stdout;
Expand Down
57 changes: 29 additions & 28 deletions common/rpackage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,43 @@
* USA
*/

#include "config.h"
#include "config.h" // IWYU pragma: associated

#include "i18n.h"
#include "rpackage.h"

#include "i18n.h"
#include "rconfiguration.h"
#include "rpackagecache.h"
#include "rpackagelister.h"

#include <algorithm>
#include <assert.h>
#include <cstdio>
#include <fstream>
#include <map>
#include <string>
#include <sstream>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>

#include <apt-pkg/acquire-item.h>
#include <apt-pkg/acquire.h>
#include <apt-pkg/algorithms.h>
#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/depcache.h>
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/hashes.h>
#include <apt-pkg/indexfile.h>
#include <apt-pkg/metaindex.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/pkgrecords.h>
#include <apt-pkg/policy.h>
#include <apt-pkg/srcrecords.h>
#include <apt-pkg/sourcelist.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/tagfile.h>
#include <apt-pkg/version.h>
#include <apt-pkg/versionmatch.h>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <sstream>
#include <string>
#include <sys/stat.h>
#include <unistd.h>
#include <utility>
#include <vector>

#ifdef WITH_LUA
#include <apt-pkg/luaiface.h>
Expand Down Expand Up @@ -1146,26 +1150,23 @@ bool RPackage::isShallowDependency(RPackage *pkg)


// format: first version, second archives
vector<pair<string, string> > RPackage::getAvailableVersions()
vector<pair<string, string>> RPackage::getAvailableVersions()
{
string VerTag;
vector<pair<string, string> > versions;
vector<pair<string, string>> versions;

// Get available Versions.
for (pkgCache::VerIterator Ver = _package->VersionList();
Ver.end() == false; Ver++) {
for (pkgCache::VerIterator Ver = _package->VersionList(); Ver.end() == false; Ver++) {

// We always take the first available version.
pkgCache::VerFileIterator VF = Ver.FileList();
if (!VF.end()) {
pkgCache::PkgFileIterator File = VF.File();

if (File.Archive() != 0)
versions.push_back(pair < string,
string > (Ver.VerStr(), File.Archive()));
else
versions.push_back(pair < string,
string > (Ver.VerStr(), File.Site()));

if (File.Archive() != NULL) {
versions.push_back(pair<string, string>(Ver.VerStr(), File.Archive()));
} else {
versions.push_back(pair<string, string>(Ver.VerStr(), File.Site()));
}
}
}

Expand Down
Loading